<script setup>
import { darkTheme, dateZhCN, zhCN } from 'naive-ui'
import NaiveProvider from '@/components/common/naive-provider.vue'
import { isDark } from '@/composables'
import { useThemeStyles } from '@/stores'

const themeOverrides = useThemeStyles()

const isDarkTheme = computed(() => isDark.value ? darkTheme : null)
</script>

<template>
  <n-config-provider
    :date-locale="dateZhCN" :locale="zhCN" :theme="isDarkTheme" :theme-overrides="themeOverrides.lightThemeStyles"
    h="full"
  >
    <NaiveProvider>
      <router-view />
    </NaiveProvider>
  </n-config-provider>
</template>
